<?php
class role{
	public function init($params=array()){
		$this->db=$this->yum->library($this->yum->vars('app','database'));
		$this->prefix=$this->yum->vars('app','prefix');
	}
	public function Count($params=array()){
		$params['select']='COUNT(*) AS count';
		return $this->db->select($this->prefix.'role',$params);
	}
    function GRole($params=array()){
    	return $this->db->select($this->prefix.'role',$params);
    }
    public function IRole($params,$mode=0){
		return $this->db->insert($this->prefix.'role',$params,$mode);
	}
	public function URole($params){
		return $this->db->update($this->prefix.'role',$params);
	}
}
?>